package com.wenwu.service;

import java.util.List;

import com.wenwu.common.bean.RelicsAttachment;
import com.wenwu.common.bean.RelicsDetail;
import com.wenwu.common.exception.RelicsException;

/**
 * @project RelicsProject-service
 * @class CommonService.java
 * @author zhujiagui E-mail:<zhujiagui@zkingsoft.com>
 * @date 2015年5月6日 下午9:52:28
 * @description 公共service
 */
public interface CommonService {
	List<RelicsAttachment> selectAttachmentListByKey(Integer key,
			Integer... owns) throws RelicsException;

	/**
	 * 
	 * @param key
	 *            主表主键值
	 * @param tableName
	 *            主表表名
	 * @param filedId1
	 *            所属表主键名
	 * @param filedId2
	 *            主表主键名
	 * @param owns
	 *            所属表的附件所属
	 * @return
	 * @throws RelicsException
	 * @description 查询语句： select /* from relics_attachment where
	 *              attachment_owner in(${owns}) and table_owner=(select
	 *              ${filedId1} from ${tableName} where
	 *              ${filedId2}=#{key,jdbcType=INTEGER})
	 */
	List<RelicsAttachment> selectAttachmentListByKey(Integer key,
			String tableName, String filedId1, String filedId2, Integer... owns)
			throws RelicsException;

	/**
	 * 查询遗址概况信息
	 */
	RelicsDetail selectRelicsDetail() throws RelicsException;

	RelicsDetail addRelicsdetail(RelicsDetail detail) throws RelicsException;
}
